Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • xtivreg2 does not allow me to use time fixed effects. I get "factor-variable operators not allowed".*

    Hello!

    I am using Stata/SE 16.1. I have a panel date set of 407 municipalities over a thirty years period (12,210 observations in total). This is an instrumental variable approach and I am using the command xtivreg2.

    I need to include time fixed effects (along with entity FE), which is usually stated as i.year. However, xtivreg2 does not allow to use factor-variable operators.

    Code:
    xtset mun_code year
    
    xtivreg2 displacement i.year (concessions=gold_anomalies), fe cluster (department) first

    I get the message: "factor-variable operators not allowed".

    If I take out i.year I can run the regression.

    My question is: How could I include time (year) fixed effects without using them as a factor-variable operator?

    Thank you in advance.

  • #2
    Paola:
    already posted and replied at https://www.statalist.org/forums/for...-fixed-effects.
    As per FAQ, please do not bump, follow the query/replies flow and be patient if your questions are not immediately replied. Thanks
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Problem solved. Thank you so much, Carlo.

      Comment

      Working...
      X